import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

const login = r => require.ensure([], () => r(require('@/page/login')), 'login');
const regester = r => require.ensure([], () => r(require('@/page/regester')), 'regester'); //企业注册
const userRegester = r => require.ensure([], () => r(require('@/page/userRegester')), 'userRegester'); //用户注册
const manage = r => require.ensure([], () => r(require('@/page/manage')), 'manage');

const zpcenter = r => require.ensure([], () => r(require('@/page/qiye/zpcenter')), 'zpcenter'); //招聘中心
const companyDetail = r => require.ensure([], () => r(require('@/page/qiye/companyDetail')), 'companyDetail'); //公司详情
const editeDetail = r => require.ensure([], () => r(require('@/page/qiye/editeDetail')), 'editeDetail'); //修改公司详情
const stoppedzp = r => require.ensure([], () => r(require('@/page/qiye/stoppedzp')), 'stoppedzp'); //已停止招聘
const Jobdetails = r => require.ensure([], () => r(require('@/page/qiye/Jobdetails')), 'Jobdetails'); //职位详情
const myrecruitment = r => require.ensure([], () => r(require('@/page/qiye/myrecruitment')), 'myrecruitment'); //我的招聘
const alternativeresume = r => require.ensure([], () => r(require('@/page/qiye/alternativeresume')), 'alternativeresume'); //备用简历
const jobwantDetail = r => require.ensure([], () => r(require('@/page/qiye/jobwantDetail')), 'jobwantDetail'); //求职者简历详情
const postzw = r => require.ensure([], () => r(require('@/page/qiye/postzw')), 'postzw'); //发布职位
const account = r => require.ensure([], () => r(require('@/page/qiye/account')), 'account'); //账号管理


const routes = [
	{
		path: '/',
		component: login
	},
	{
		path: '/regester',
		component: regester
	},
	
	{
		path: '/userRegester',
		component: userRegester
	},
	{
		path: '/manage',
		component: manage,
		name: 'manage',
		children: [{
			path: '/zpcenter',
			component: zpcenter,
			meta: [],
		},{
			path: '/companyDetail',
			component: companyDetail,
			meta: [],
		},{
			path: '/editeDetail',
			component: editeDetail,
			meta: [],
		},{
			path: '/stoppedzp',
			component: stoppedzp,
			meta: [],
		},{
			path: '/Jobdetails',
			component: Jobdetails,
			meta: [],
		},{
			path: '/myrecruitment',
			component: myrecruitment,
			meta: [],
		},{
			path: '/alternativeresume',
			component: alternativeresume,
			meta: [],
		},{
			path: '/jobwantDetail',
			component: jobwantDetail,
			meta: [],
		},{
			path: '/postzw',
			component: postzw,
			meta: [],
		},{
			path: '/account',
			component: account,
			meta: [],
		}]
	}
]
export default new Router({
	routes,
	strict: process.env.NODE_ENV !== 'production',
})
